package com.sky.mapper;

import com.sky.dto.GoodsSalesDTO;
import com.sky.dto.ReportUserStatisticsDTO;
import com.sky.vo.OrderReportDayVO;
import com.sky.vo.OrderReportVO;
import org.apache.ibatis.annotations.Mapper;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yangkexuan
 * @className ReportMapper
 * @date 2023/6/16 14:43
 * @description
 */
@Mapper
public interface ReportMapper {
    /**
     * 商品销量前10 查询
     * @param begin
     * @param end
     * @return
     */
    List<GoodsSalesDTO> selectTop10(LocalDateTime begin, LocalDateTime end);

    /**
     * 用户统计接口
     * @param begin
     * @param end
     * @return
     */
    List<ReportUserStatisticsDTO> userStatistics(LocalDateTime begin, LocalDateTime end);

    /**
     * 营业额统计
     * @param atStartOfDay
     * @param atStartOfDay1
     * @return
     */
    List<ReportUserStatisticsDTO> turnoverStatistics(LocalDateTime begin, LocalDateTime end);

    /**
     * 获取订单总数，有效订单
     * @param begin
     * @param end
     * @return
     */
    OrderReportVO ordersStatistics(LocalDateTime begin, LocalDateTime end);

    /**
     * 获取每日订单总数，每日有效订单，日期
     * @param atStartOfDay
     * @param atStartOfDay1
     * @return
     */
    List<OrderReportDayVO> ordersStatisticsDay(LocalDateTime begin, LocalDateTime end);
}
